package com.autumn.cloud.demo.consumer.client;

import com.autumn.cloud.demo.common.constants.DemoServiceProviderUrlConstants;
import com.autumn.cloud.demo.common.model.OrderInfo;
import com.autumn.cloud.demo.common.model.UserInfo;
import com.autumn.web.vo.ApiResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * <p>
 * </p>
 *
 * @description TODO UserInfoFallbackFactory
 * @author: 老码农
 * @create: 2020-12-11 01:57
 **/
@FeignClient(value = "${provider.demo-service}", fallbackFactory = DemoFeignClientFallbackFactory.class)
public interface DemoFeignClient {

    /**
     * 获取用户信息
     *
     * @return
     */
    @GetMapping(DemoServiceProviderUrlConstants.USER_INFO_URL)
    UserInfo getUserInfo();

    /**
     * 获取订单信息
     *
     * @return
     */
    @GetMapping(DemoServiceProviderUrlConstants.ORDER_INFO_URL)
    ApiResponse<OrderInfo> getOrderInfo();

}
